package com.test1;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Typeface;
import android.util.Log;

public class GameFont implements GameResource {
	private Typeface type;
	private int size = 0;
	private int color = 0xff000000;
	private boolean underline = false;
	private int bold;
	private boolean Italic;
	
	public GameFont(){
	}
	
	public GameFont( int size ){
		this.size = size;
	}
	
	public void drawText( Canvas canvas, String text, int x, int y ){
		Log.d( "lijujn", "drawText" + x );
		Paint paint = ResourceManager.popPaint();
		paint.setAntiAlias(true);
		paint.setColor(Color.WHITE);
		paint.setTextSize(16);
		paint.setUnderlineText( this.underline );
		paint.setTextAlign( Align.CENTER );
		canvas.drawText( text, x, y, paint );
		ResourceManager.pushPaint( paint );
	}

	public void clean() {
		// TODO Auto-generated method stub
		this.size = 0;
		this.color = 0;
	}
}
